package cn.kgc.tangcco.anyang.commons;

public class PageParam {
	/**
	 * 页码号
	 */
	private Integer pageNum;
	/**
	 * 每页记录数
	 */
	private Integer pageSize;
	/**
	 * 排序字段
	 */
	private String orderBy;
	/**
	 * Ascending descending
	 */
	private Enum<OrderBy> ascOrDesc;

	public PageParam() {
		this(1, 5);
	}

	public PageParam(Integer pageNum, Integer pageSize) {
		super();
		this.pageNum = pageNum;
		this.pageSize = pageSize;
	}

	public PageParam(Integer pageNum, Integer pageSize, String orderBy, Enum<OrderBy> ascOrDesc) {
		super();
		this.pageNum = pageNum;
		this.pageSize = pageSize;
		this.orderBy = orderBy + " " + ascOrDesc;
	}

	public Integer getPageNum() {
		return pageNum;
	}

	public void setPageNum(Integer pageNum) {
		this.pageNum = pageNum;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public String getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(String orderBy) {
		this.orderBy = orderBy;
	}

	public Enum<OrderBy> getAscOrDesc() {
		return ascOrDesc;
	}

	public void setAscOrDesc(Enum<OrderBy> ascOrDesc) {
		this.ascOrDesc = ascOrDesc;
	}

}
